﻿// CurvePoint.cpp: 实现文件
//

#include "pch.h"
#include "3180101584SX1.h"
#include "CurvePoint.h"
#include "afxdialogex.h"


// CurvePoint 对话框

IMPLEMENT_DYNAMIC(CurvePoint, CDialog)

CurvePoint::CurvePoint(CWnd* pParent /*=nullptr*/)
	: CDialog(IDD_DIALOG_CurvelPoint, pParent)
{
}

CurvePoint::~CurvePoint()
{
}

void CurvePoint::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	DDX_Control(pDX, IDC_EDIT_PointNum, m_edit);
}

void CurvePoint::GetNum()
{
	CString PN;
	Num = 1;
	PN.Format("%d", Num);
	CEdit* pBoxOne;

	//pBoxOne = (CEdit*)GetDlgItem(IDC_EDIT_PointNum);
	//付值

	//pBoxOne->SetWindowText(_T("FOO"));
	//SetDlgItemTextA(IDC_EDIT_PointNum,PN);
}


BEGIN_MESSAGE_MAP(CurvePoint, CDialog)
	ON_BN_CLICKED(IDC_BUTTON_Insert, &CurvePoint::OnBnClickedButtonInsert)
	ON_BN_CLICKED(IDC_BUTTON_Cancel, &CurvePoint::OnBnClickedButtonCancel)
END_MESSAGE_MAP()


// CurvePoint 消息处理程序


void CurvePoint::OnBnClickedButtonInsert()
{
	InsertFlag = 1;

	CDialog::OnOK();
}


void CurvePoint::OnBnClickedButtonCancel()
{
	InsertFlag = 0;

	CDialog::OnOK();
}


BOOL CurvePoint::OnInitDialog()
{
	CDialog::OnInitDialog();

	CString PN;
	PN.Format("%d", Num);
	CEdit* pBoxOne;

	pBoxOne = (CEdit*)GetDlgItem(IDC_EDIT_PointNum);
	//付值

	pBoxOne->SetWindowText(PN);

	return TRUE;  // return TRUE unless you set the focus to a control
				  // 异常: OCX 属性页应返回 FALSE
}
